import java.util.Arrays;
import java.util.Scanner;

public class day_1 {
    public static void main(String[] args) {
        StringBuffer s = new StringBuffer();
        String s1 = "";
        String s2 = "";
        Scanner scanner = new Scanner(System.in);
        s1 = scanner.nextLine();
        s2 = scanner.nextLine();
        s.append(s1);
        for (int i = 0; i < s2.length(); i++) {
            char num = s2.charAt(i);
            int index = s.indexOf(String.valueOf(num));//找到对应元素在s中的下标
            if (index >= 0) {
                s.deleteCharAt(index);//删除元素
            }
        }
        System.out.println(s);

        /*int num=0;//累加的值
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        Integer[] arr =new Integer[n*3];//所有的数据
        for(int i=0;i<n*3;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);//对数组中元素排序,从尾巴处开始加
        for (int i = 0; i <n ; i++) {//从头开始的n个元素
            int left=n*3-2;//数组倒数第二下标
            num+=arr[left-1];//先从倒数第二开始加
            left-=2;
        }
        System.out.println(num);

    }*/


    }
}
